On Containment of Conjunctive Queries with Arithmetic Comparisons

نویسندگان

  • Foto N. Afrati
  • Chen Li
  • Prasenjit Mitra
چکیده

We study the following problem: how to test if Q2 is contained in Q1, where Q1 and Q2 are conjunctive queries with arithmetic comparisons? This problem is fundamental in a large variety of database applications. Existing algorithms rst normalize the queries, then test a logical implication using multiple containment mappings from Q1 to Q2. We are interested in cases where the containment can be tested more eÆciently. This work aims to (a) reduce the problem complexity from P 2 -completeness to NP-completeness in these cases; (b) utilize the advantages of the homomorphism property (i.e., the containment test is based on a single containment mapping) in applications such as those of answering queries using views; and (c) observing that many real queries have the homomorphism property. The following are our results. (1) We show several cases where the normalization step is not needed, thus reducing the size of the queries and the number of containment mappings. (2) We develop an algorithm for checking various syntactic conditions on queries, under which the homomorphism property holds. (3) We further reduce the conditions of these classes using practical domain knowledge that is easily obtainable. (4) We conducted experiments on real queries, and show that most of the queries pass this test.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Rewriting queries using views in the presence of arithmetic comparisons

We consider the problem of answering queries using views, where queries and views are conjunctive queries with arithmetic comparisons over dense orders. Previous work only considered limited variants of this problem, without giving a complete solution. We first show that obtaining equivalent rewritings for conjunctive queries with arithmetic comparisons is decidable. Then we consider the proble...

متن کامل

Data Exchange in the Presence of Queries with Arithmetic Comparisons

In this paper we study the problem of data exchange and query answering in the presence of arithmetic comparisons (ACs). The contributions of this work are the following: a) we extend the work in [FKMP03] by assuming source-to-target constraints, target constraints and queries to include ACs, b) we give an algebraic specification to compute a universal solution using a variant of the chase proc...

متن کامل

Optimizing Conjunctive Queries over Trees Using Schema Information

We study the containment, satisfiability, and validity problems for conjunctive queries over trees with respect to a schema. We show that conjunctive query containment and validity are 2EXPTIMEcomplete w.r.t. a schema (DTD or Relax NG). Furthermore, we show that satisfiability for conjunctive queries w.r.t. a schema can be decided in NP. The problem is NP-hard already for queries using only one...

متن کامل

Containment and Optimization of Object-Preserving Conjunctive Queries

In the optimization of queries in an object-oriented database system (OODB), a natural rst step is to use the typing constraints imposed by the schema to transform a query into an equivalent one that logically accesses a minimal set of objects. We study a class of queries for OODB's called conjunctive queries. Variables in a conjunctive query range over heterogeneous sets of objects. Consequent...

متن کامل

Containment of Conjunctive Queries over Databases with Null Values

We study containment of conjunctive queries that are evaluated over databases that may contain tuples with null values. We assume the semantics of SQL for single block queries with a SELECT DISTINCT clause. This problem (“null containment” for short) is different from containment over databases without null values and sometimes more dif-

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004